cmake_minimum_required(VERSION 3.22.1)


project("mp3lame")


set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/jniLibs/${ANDROID_ABI})

#设置变量SRC_DIR为lamemp3的所在路径
set(SRC_DIR mp3lame)

#指定头文件所在，可以多次调用，指定多个路径
include_directories(mp3lame)

#设定一个目录
aux_source_directory(mp3lame SRC_LIST)

add_library(
        mp3lame

        SHARED

        mp3lame.cpp

        ${SRC_LIST}) #native-lib.cpp

find_library(
        log-lib
        log)

target_link_libraries(
        mp3lame
        ${log-lib})